<template>
  <div class="edit-pricing">
    <!-- 选择国家 -->
    <div class="edit-pricing-item">
      <div class="edit-pricing-item-title">选择国家</div>
      <div class="edit-pricing-item-content">
        <el-checkbox-group v-model="country">
          <el-checkbox label="全部"></el-checkbox>
          <el-checkbox label="美国"></el-checkbox>
          <el-checkbox label="英国"></el-checkbox>
        </el-checkbox-group>
      </div>
    </div>
    <!-- 定制价格 -->
    <div class="edit-pricing-customization">
      <div class="edit-pricing-customization-title">定制价格</div>
      <div class="edit-pricing-customization-content">
        <el-radio-group v-model="customization">
          <el-radio :label="1">直接定价</el-radio>
          <el-radio :label="2">按利润率定价</el-radio>
          <el-radio :label="3">按公式定价</el-radio>
        </el-radio-group>
      </div>
      <div class="edit-pricing-customization-box">
        <div
          class="edit-pricing-customization-box-direct"
          v-if="customization == 1"
        >
          <el-input placeholder="请输入价格" v-model="directPrice" clearable>
          </el-input>
          <span>美元</span>
        </div>
        <div
          class="edit-pricing-customization-box-profit"
          v-else-if="customization == 2"
        >
          <div class="customization-profit-box">
            <div class="customization-profit-box-name">
              <el-input
                placeholder="请输入利润率"
                v-model="directPrice"
                clearable
              >
              </el-input>
              <span>%</span>
            </div>
            <div class="customization-profit-box-name">
              <el-input
                placeholder="保底收益(选填)"
                v-model="directPrice"
                clearable
              >
              </el-input>
              <span>美元</span>
            </div>
          </div>
          <div class="customization-profit-box">
            <div class="customization-profit-box-name">
              <el-checkbox v-model="checked"
                >价格在xx.01至xx.50的产品格式化为xx.49</el-checkbox
              >
            </div>
            <div class="customization-profit-box-name">
              <el-button type="primary" size="small" plain
                >自定义尾数</el-button
              >
            </div>
          </div>
          <div class="customization-profit-box">
            <div class="customization-profit-box-name">
              <el-checkbox v-model="checked"
                >价格在xx.51至xx.00的产品格式化为xx.99</el-checkbox
              >
            </div>
            <div class="customization-profit-box-name">
              <el-button type="primary" size="small" plain
                >自定义尾数</el-button
              >
            </div>
          </div>
        </div>
        <div
          class="edit-pricing-customization-box-formula"
          v-else-if="customization == 3"
        >
          <div class="customization-profit-box">
            <div class="customization-profit-box-name">
              <div class="customization-profit-box-name-text">成本价</div>
              <span>x</span>
              <el-input
                placeholder="请输入倍数"
                v-model="directPrice"
                clearable
              >
              </el-input>
              <span>+</span>
              <el-input
                placeholder="请输入差价"
                v-model="directPrice"
                clearable
              >
              </el-input>
            </div>
          </div>
          <div class="customization-profit-box">
            <div class="customization-profit-box-name">
              <el-checkbox v-model="checked"
                >价格在xx.01至xx.50的产品格式化为xx.49</el-checkbox
              >
            </div>
            <div class="customization-profit-box-name">
              <el-button type="primary" size="small" plain
                >自定义尾数</el-button
              >
            </div>
          </div>
          <div class="customization-profit-box">
            <div class="customization-profit-box-name">
              <el-checkbox v-model="checked"
                >价格在xx.51至xx.00的产品格式化为xx.99</el-checkbox
              >
            </div>
            <div class="customization-profit-box-name">
              <el-button type="primary" size="small" plain
                >自定义尾数</el-button
              >
            </div>
          </div>
        </div>
      </div>
    </div>
    <!-- 定制价格(选填) -->
    <div class="edit-pricing-customization-optional">
      <div class="edit-pricing-customization-optional-title">
        定制价格(选填)
      </div>
      <div class="edit-pricing-customization-optional-box">
        <div class="customization-optional-box-input">
          <span>在售价基础上减</span>
          <el-input placeholder="请输入内容" v-model="directPrice" clearable>
          </el-input>
          <span>%</span>
        </div>
        <div class="customization-optional-box-input">
          <el-date-picker
            v-model="value1"
            type="daterange"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
          >
          </el-date-picker>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'editPricingManagement',
  components: {},
  props: {},
  data() {
    return {
      country: [], // 选择国家
      customization: 1, // 定制价格
      directPrice: '', // 直接定价
      value1: '',
      checked: false,
    };
  },
  computed: {},
  watch: {},
  created() {},
  methods: {},
  mounted() {},
};
</script>

<style scoped lang="less">
.edit-pricing {
  // 选择国家
  .edit-pricing-item {
    .edit-pricing-item-title {
      font-weight: 700;
      height: 40px;
      line-height: 40px;
    }
  }
  // 定制价格
  .edit-pricing-customization {
    .edit-pricing-customization-title {
      font-weight: 700;
      height: 40px;
      line-height: 40px;
    }
    .edit-pricing-customization-box {
      display: flex;
      padding: 12px;
      border-radius: 4px;
      margin-top: 12px;
      background-color: #ebebeb;

      .edit-pricing-customization-box-direct {
        display: flex;
        align-items: center;

        span {
          text-align: center;
          width: 60px;
        }
      }
      .edit-pricing-customization-box-profit {
        display: flex;
        flex-direction: column;

        .customization-profit-box {
          display: flex;
          justify-content: space-between;
          margin-bottom: 12px;

          .customization-profit-box-name {
            display: flex;
            align-items: center;

            span {
              text-align: center;
              width: 40px;
            }
          }
        }
      }
      .edit-pricing-customization-box-formula {
        display: flex;
        flex-direction: column;

        .customization-profit-box {
          display: flex;
          justify-content: space-between;
          margin-bottom: 12px;

          .customization-profit-box-name {
            display: flex;
            align-items: center;

            .customization-profit-box-name-text {
              width: 50px;
              font-weight: 700;
            }

            .el-input {
              width: 150px;
            }

            span {
              text-align: center;
              width: 40px;
            }
          }
        }
      }
    }
  }
  // 定制价格(选填)
  .edit-pricing-customization-optional {
    .edit-pricing-customization-optional-title {
      font-weight: 700;
      height: 40px;
      line-height: 40px;
    }

    .edit-pricing-customization-optional-box {
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap;
      padding: 12px;
      border-radius: 4px;
      margin-top: 12px;
      background-color: #ebebeb;

      .customization-optional-box-input {
        display: flex;
        align-items: center;
        margin-bottom: 12px;

        span {
          padding: 0 10px;
        }

        .el-input {
          width: 135px;
        }
      }
    }
  }
}
</style>
